public class Dog {
    public String name;
    public String gender;
    public int age;

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                '}';
    }

    public Dog(String name, String gender, int age){
        this.name = name;
        this.gender =gender;
        this.age = age;
    }

    public void eat(){
        System.out.println(name+"正在吃饭 ");
    }
}
